WARNING: This program has a bug, which means we need to fix it. This bug is a logic error.

RULE: You must check your programs to make sure they make sense! Use test values to help find errors.

  • Click Run and watch the stage to see what's wrong. The fish gives the wrong feedback!
  • Try entering a number lower than rand_num, see what the fish says.
  • Debug this program so that the sprite gives the correct response when you guess too high or too low.
  • Hint: The greater than and less than signs need to be reversed.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)